#include <fhe/core/SerializerRegisterer.h>

namespace fhe
{
  namespace core
  {
    namespace 
    {
      template <typename T>
      void serialize( const Data::Ptr& data, T t )
      {
        data->set<T>( t );
      }
      
      template <typename T>
      T deserialize( const Data::Ptr& data )
      {
        return data->get<T>();
      }
    }
    
    FHE_SERIALIZER( bool, bool, &serialize<bool>, &deserialize<bool> );
    FHE_SERIALIZER( int, int, &serialize<int>, &deserialize<int> );
    FHE_SERIALIZER( double, double, &serialize<double>, &deserialize<double> );
    FHE_SERIALIZER( string, std::string, &serialize<std::string>, &deserialize<std::string> );
  }
}
